\(\int (c+d x^{-1+n}) \, dx\) [580]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 9, antiderivative size = 12 \[ \int \left (c+d x^{-1+n}\right ) \, dx=c x+\frac {d x^n}{n} \]

[Out]

c*x+d*x^n/n

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \[ \int \left (c+d x^{-1+n}\right ) \, dx=c x+\frac {d x^n}{n} \]

[In]

Int[c + d*x^(-1 + n),x]

[Out]

c*x + (d*x^n)/n

Rubi steps \begin{align*} \text {integral}& = c x+\frac {d x^n}{n} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00 \[ \int \left (c+d x^{-1+n}\right ) \, dx=c x+\frac {d x^n}{n} \]

[In]

Integrate[c + d*x^(-1 + n),x]

[Out]

c*x + (d*x^n)/n

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.08

method result size
default \(c x +\frac {d \,x^{n}}{n}\) \(13\)
parts \(c x +\frac {d \,x^{n}}{n}\) \(13\)
risch \(c x +\frac {d x \,x^{-1+n}}{n}\) \(16\)
parallelrisch \(c x +\frac {d x \,x^{-1+n}}{n}\) \(16\)
norman \(c x +\frac {d x \,{\mathrm e}^{\left (-1+n \right ) \ln \left (x \right )}}{n}\) \(18\)

[In]

int(c+d*x^(-1+n),x,method=_RETURNVERBOSE)

[Out]

c*x+d*x^n/n

Fricas [A] (verification not implemented)

none

Time = 0.82 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.42 \[ \int \left (c+d x^{-1+n}\right ) \, dx=\frac {c n x + d x x^{n - 1}}{n} \]

[In]

integrate(c+d*x^(-1+n),x, algorithm="fricas")

[Out]

(c*n*x + d*x*x^(n - 1))/n

Sympy [A] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00 \[ \int \left (c+d x^{-1+n}\right ) \, dx=c x + d \left (\begin {cases} \frac {x^{n}}{n} & \text {for}\: n \neq 0 \\\log {\left (x \right )} & \text {otherwise} \end {cases}\right ) \]

[In]

integrate(c+d*x**(-1+n),x)

[Out]

c*x + d*Piecewise((x**n/n, Ne(n, 0)), (log(x), True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00 \[ \int \left (c+d x^{-1+n}\right ) \, dx=c x + \frac {d x^{n}}{n} \]

[In]

integrate(c+d*x^(-1+n),x, algorithm="maxima")

[Out]

c*x + d*x^n/n

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00 \[ \int \left (c+d x^{-1+n}\right ) \, dx=c x + \frac {d x^{n}}{n} \]

[In]

integrate(c+d*x^(-1+n),x, algorithm="giac")

[Out]

c*x + d*x^n/n

Mupad [B] (verification not implemented)

Time = 11.32 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00 \[ \int \left (c+d x^{-1+n}\right ) \, dx=c\,x+\frac {d\,x^n}{n} \]

[In]

int(c + d*x^(n - 1),x)

[Out]

c*x + (d*x^n)/n